package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbTermino generated by hbm2java
 */
@Entity
@Table(name = "TB_TERMINO", schema = "CATALOGOS")
public class TbTermino implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String ctermino;
	private String cusuario;
	private String dtermino;
	private Date fhingreso;
	private Integer bstatus;
	private String mdistribucion;
	private Set<RcRuc> rcRucs = new HashSet<RcRuc>(0);
	private Set<RcObligacion> rcObligacions = new HashSet<RcObligacion>(0);

	public TbTermino() {
	}

	public TbTermino(String ctermino, String cusuario, String dtermino,
			Date fhingreso, Integer bstatus) {
		this.ctermino = ctermino;
		this.cusuario = cusuario;
		this.dtermino = dtermino;
		this.fhingreso = fhingreso;
		this.bstatus = bstatus;
	}

	public TbTermino(String ctermino, String cusuario, String dtermino,
			Date fhingreso, Integer bstatus, String mdistribucion,
			Set<RcRuc> rcRucs, Set<RcObligacion> rcObligacions) {
		this.ctermino = ctermino;
		this.cusuario = cusuario;
		this.dtermino = dtermino;
		this.fhingreso = fhingreso;
		this.bstatus = bstatus;
		this.mdistribucion = mdistribucion;
		this.rcRucs = rcRucs;
		this.rcObligacions = rcObligacions;
	}

	@Id
	@Column(name = "C_TERMINO", unique = true, nullable = false, length = 3)
	public String getCtermino() {
		return this.ctermino;
	}

	public void setCtermino(String ctermino) {
		this.ctermino = ctermino;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Column(name = "D_TERMINO", nullable = false, length = 40)
	public String getDtermino() {
		return this.dtermino;
	}

	public void setDtermino(String dtermino) {
		this.dtermino = dtermino;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}

	@Column(name = "M_DISTRIBUCION", length = 1)
	public String getMdistribucion() {
		return this.mdistribucion;
	}

	public void setMdistribucion(String mdistribucion) {
		this.mdistribucion = mdistribucion;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbTermino")
	public Set<RcRuc> getRcRucs() {
		return this.rcRucs;
	}

	public void setRcRucs(Set<RcRuc> rcRucs) {
		this.rcRucs = rcRucs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbTermino")
	public Set<RcObligacion> getRcObligacions() {
		return this.rcObligacions;
	}

	public void setRcObligacions(Set<RcObligacion> rcObligacions) {
		this.rcObligacions = rcObligacions;
	}

}
